package day06.link;

import java.util.LinkedHashSet;

/**
 * @Auther: sky
 * @Date: 2019/2/28 23:51
 * @Description:
 */
public class LinkedHashSetTest {

    public static void main(String[] args) {
        LinkedHashSet<Integer> linkedHashSet = new LinkedHashSet<>();
        linkedHashSet.add(1);
        linkedHashSet.add(100);
        linkedHashSet.add(112);
        linkedHashSet.add(121);
        linkedHashSet.add(22);
        linkedHashSet.add(55);

        //能保证插入顺序
        for (Integer i: linkedHashSet) {
            System.out.println(i);
        }

    }

}
